jsonassets_guidefandomcom-20200214-history
Test Page
Understanding a crop.JSON File { "Name": "Honeysuckle", "Product": "Honeysuckle", "SeedName": "Honeysuckle Seeds", "SeedDescription": "Plant in spring or summer. Takes 15 days to produce sweet smelling flowers.", "Type": "Flower", "Seasons": "summer", "Phases": [ 1, 2, 3, 4, 5, 6], "RegrowthPhase": 4, "HarvestWithScythe": false, "TrellisCrop": true, "Colors": [ "224, 115, 83, 255", "119, 137, 0, 255", "99, 68, 161, 255" ], "Bonus": { "MinimumPerHarvest": 1, "MaximumPerHarvest": 10, "MaxIncreasePerFarmLevel": 5, "ExtraChance": 0.0, }, "SeedPurchasePrice": 50, "SeedPurchaseRequirements": [ "w sunny", "y 2", "d Mon Tue Wed Thu Fri", ], } This is an example of a standard crop.json file. The following is an explanation of each asset. Name & Product "Name": "Honeysuckle", "Product": "Honeysuckle", "Name": "Honeysuckle", This needs to match the folder the crop.json 'is in. Ex. If you wanted to create a mango it would look like: "Name": "Mango", "Product": "Honeysuckle", This tells JsonAssets what to look for. The '''product '''needs to match the folder name of the corresponding product; this is also how the product will appear named in game. Seed Name & Description "SeedName": "Honeysuckle Seeds", "SeedDescription": "Plant in spring or summer. Takes 15 days to produce sweet smelling flowers.", Seed name is the name of your seeds and how it will appear in game. Ex. If we wanted mango seeds it would be "SeedName": "Mango Seeds". Seed description tells what season and how long the crop grows. Types "Type": "Flower", Type is how the game determines what can be made with the product. If this was set to vegetable you could pickle it or turn it into juice like you would a vanilla vegetable crop. There are numerous types supported these are: *Vegetable *Fruit *Flower *Gem *Fish *Egg *Milk *Cooking *Crafting *Mineral *Meat *Metal *Junk *Syrup *MonsterLoot *ArtisanGoods *Seeds The most common ones you will use are: Vegetable, Fruit, Flower, and ArtisanGoods. Seasons "Seasons": "summer", Determines which season the crop will grow in. If you want a crop to grow in all seasons you would have to type: "Seasons": "summer", "fall", "winter", Phases '''Phases '''references the '''crop.png '(as shown below). The number of phases directly corresponds to the number of sprites in your tilesheet. There are two types of crops. '''One-off '''and '''Regrowable. The maximum phases a crop can have is 6. Phase growth rates do not have to be sequential (ex. 1, 2, 3) but for the purpose of this example they have been made sequential. One-off Crops An example of one off crops in the vanilla base game is the parsnip. For our example, we'll be using Aloe. "Phases": [ 1, 2, 3, 4 ], "RegrowthPhase": -1, Let's break this tilesheet down. One-off crops can have 2 - 5 phases, our Aloe happens to have an average amount of 4. Our aloe takes 10 days to complete. We can determine this by looking at "Phases": 2, 3, 4, Where each number corresponds to the number of days (in game) it takes to get to the next phase. 1 + 2 + 3 + 4 = 10 days. "RegrowthPhase": -1, '-1 will be used for this value for all one-off crops'. Regrowable Crops An example of a regrowable crop in the vanilla base game would be blueberries or ancient fruit. Let's go back to our Honeysuckle. "Phases": [ 1, 2, 3, 4, 5, 6], "RegrowthPhase": 4, Let's break this tilesheet down. Regrowable crops can have 3 - 6 phases. Our Honeysuckle has the maximum. Our Honeysuckle crop takes 15 days to grow, 1 + 2 + 3 + 4 + 5 = 15 days. ''' The final number, '6' determines '''how many days our Honeysuckle takes to regrow. "RegrowthPhase": 4, with regrowable '''crops the game needs to know which stage to start regrowing at. This number is the stage '''before '''the final crop phase. Harvesting and Trellis Crops "HarvestWithScythe": false, "TrellisCrop": true, "HarvestWithScythe" can either be set to true or false. If it is true it will function like 'Wheat' if it is set to false it will function like a normal harvest crop. "TrellisCrop" can either be set to true or false. If it is true it will be impassable and function like 'Grapes'. If it is set to false you can pass through it like a normal crop. Colors "Colors": [ "224, 115, 83, 255", "119, 137, 0, 255", "99, 68, 161, 255" ], "Colors" is only needed for products that have multiple colors (primarily non-regrowing '''flowers--regrowable flowers, like Sunflowers, have no additional colors). JsonAssets uses RGBA If you are creating a crop that does not require colors you can either erase the "Colors" section or replace it with null. "Colors": null, Harvest Bonus "Bonus": { "MinimumPerHarvest": 1, "MaximumPerHarvest": 10, "MaxIncreasePerFarmLevel": 5, "ExtraChance": 0.0, }, "MinimumPerHarvest" is how many products at minimum do you get, this value should be 1 or greater. "MaximumPerHarvest" is the most products you can get from a crop "MaxIncreasePerFarmLevel" is how many experience points you get for the crop "ExtraChance" This value should be anywhere from 0.0 to 1.0 and determines if you get extra crops or not. This is not always garunteed to be the '''"MaximumPerHarvest" '''you have set. Ex. 0.2 would mean an extra 20% chance to get 2 or more product. Seed Purchase Price & Requirements "SeedPurchasePrice": 50, "SeedPurchaseRequirements": [ "w sunny", "y 2", "d Mon Tue Wed Thu Fri", ], "SeedPurchasePrice" determines how much a single package of seeds costs. "SeedPurchaseRequirements" are if you wish to have the seeds locked behind something. There are certain '''Event Preconditions '''you can use for this field. A complete list can be located here . If you do not want to have your seeds locked, you can either erase the "SeedPurchaseRequirement" field or replace the variables with null "SeedPurchaseRequirements": null, Now you're ready to add the product!